package com.ipc.admin.controller.zzcool;

import com.ipc.admin.service.zzcool.service.CouponDetailsService;
import com.ipc.common.pojo.vo.R;
import com.ipc.common.pojo.zzcool.bo.CouponBo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Zzcool
 * @create 2023-04-30 22:52
 */
@RestController
@RequestMapping(value = "/api/CouponDetailsController/", produces = "application/json; charset=utf-8")
@CrossOrigin
@Api(tags = "优惠卷详情模块")
public class CouponDetailsController {

    @Resource
    private CouponDetailsService service;


    @ApiOperation("动态查询优惠卷详情所有数据")
    @GetMapping("queryAll")
    public R queryAll(CouponBo bo) {
        return R.ok(service.queryAll(bo));
    }


    @ApiOperation("优惠卷详情 导出 Excel")
    @PostMapping("exportData")
    public void exportData(HttpServletResponse response) throws IOException {
        service.exportData(response);
    }

//    @ApiOperation("查询所有数据")
//    @GetMapping("save")
//    public R save(@RequestBody CouponDetails couponDetails){
//        return R.ok(service.save(couponDetails));
//    }
//
//    @ApiOperation("查询所有数据")
//    @GetMapping("delBycid")
//    public R delBycid(int id){
//        return R.ok(service.delBycid(id));
//    }

}
